﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

namespace ISB_iCard
{
    static class Utility
    {

        static public bool CheckWiFi()
        {
            bool ret = false;

            try
            {
                string hostName = Dns.GetHostName();

                IPHostEntry hostEntry = Dns.GetHostEntry(hostName);
                string hostIPAdd = hostEntry.AddressList[0].ToString();
                //hostIPAdd = "127.0.0.1";
                ret = hostIPAdd != IPAddress.Parse("127.0.0.1").ToString();
            }
            catch
            {
                return ret;
            }
            return ret;
        }
    }
}
